package com.hsc.www.validator.test2;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

public class Student {

    @NotEmpty(groups = Update.class, message = "ID不能为空")
    private Integer id;

    @NotEmpty(groups = Insert.class, message = "姓名不能为空")
    private String name;

    @NotNull(groups = Insert.class, message = "年龄不能为空")
    @Min(groups = Insert.class, value = 18, message = "年龄不能小于18")
    private Integer age;
}
